import React, { Component } from "react";
import axios from "axios";
export default class book extends Component {
  constructor() {
    super();
    this.state = {
      content: ""
    };
  }
  componentDidMount() {
    axios
      .get("http://localhost/8080/hot/text", {
        params: { id: this.props.match.params.id }
      })
      .then(res => {
        this.setState({
          content: res.data.content
        });
      });
  }
  render() {
    return <div dangerouslySetInnerHTML={{ __html: this.state.content }} />;
  }
}
